<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:useBean id="member" class="oneroom.admin.member.MemberDao" scope="page"/>
<%@ page import="java.util.HashMap"%>
<%
	String	mode = request.getParameter("mode") == null ? "" : request.getParameter("mode");
	HashMap	returnMap = new HashMap();
	String saveYn = "";
	if(mode.equals("D")){
		returnMap	= member.getDelete(request);
		mode		= (String)returnMap.get("mode");
		saveYn		= (String)returnMap.get("saveYn");
	}else{
		returnMap	= member.bunki(request);
		mode		= (String)returnMap.get("mode");
		saveYn		= (String)returnMap.get("saveYn");
	}
	 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>회원</title>
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
<%
	if(mode.equals("I")){
		if(saveYn.equals("true")){
%>
			location.href="list.jsp";
			alert("등록 되었습니다.");
<%
		}else if(saveYn.equals("false")){
%>
			location.href="write.jsp";
			alert("등록 실패하였습니다.");
<%
		}
	}else if(mode.equals("U")){
		if(saveYn.equals("true")){
%>
			location.href="write.jsp?id=<%=returnMap.get("id")%>&amp;mode=<%=returnMap.get("mode")%>&amp;searchGubn=<%=returnMap.get("searchGubn")%>&amp;searchValue=<%=returnMap.get("searchValue")%>&amp;txtSelectPage=<%=returnMap.get("txtSelectPage")%>&amp;txtSelectBlock=<%=returnMap.get("txtSelectBlock")%>";
			alert("수정 되었습니다.");
<%
		}else if(saveYn.equals("false")){
%>
			location.href="write.jsp?id=<%=returnMap.get("id")%>&amp;mode=<%=returnMap.get("mode")%>&amp;searchGubn=<%=returnMap.get("searchGubn")%>&amp;searchValue=<%=returnMap.get("searchValue")%>&amp;txtSelectPage=<%=returnMap.get("txtSelectPage")%>&amp;txtSelectBlock=<%=returnMap.get("txtSelectBlock")%>";
			alert("수정 실패하였습니다.");
<%
		}
	}else if(mode.equals("D")){
		if(saveYn.equals("true")){
%>
			location.href="list.jsp?searchGubn=<%=returnMap.get("searchGubn")%>&amp;searchValue=<%=returnMap.get("searchValue")%>&amp;txtSelectPage=<%=returnMap.get("txtSelectPage")%>&amp;txtSelectBlock=<%=returnMap.get("txtSelectBlock")%>";
			alert("삭제 되었습니다.");
<%
		}else if(saveYn.equals("false")){
%>
			location.href="view.jsp?idx=<%=returnMap.get("idx")%>&amp;mode=<%=returnMap.get("mode")%>&amp;searchGubn=<%=returnMap.get("searchGubn")%>&amp;searchValue=<%=returnMap.get("searchValue")%>&amp;txtSelectPage=<%=returnMap.get("txtSelectPage")%>&amp;txtSelectBlock=<%=returnMap.get("txtSelectBlock")%>";
			alert("삭제 실패하였습니다.");
<%
	}
}
%>
</script>
</head>
</html>